package com.cll.prototype.stream.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.messaging.Message;

/**
 * 描述信息:
 *
 * @author CLL
 * @version 1.0
 * @date 2020/11/10 10:18
 */
@EnableBinding(Sink.class)
public class MessageConsumerService {

    private static final Logger logger = LoggerFactory.getLogger(MessageConsumerService.class);

    @StreamListener(Sink.INPUT)
    public void receiveMessages(Message<String> message) {
        logger.info("===>>> consumer 8755 receive message  = {}", message);
    }
}